3.264 \(\int \frac{(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{(c+d \sin (e+f x))^3} \, dx\)

Optimal. Leaf size=305 \[ -\frac{a^3 (c-d) \left (A d \left (2 c^2+6 c d+7 d^2\right )-3 B \left (4 c^2 d+2 c^3+c d^2-2 d^3\right )\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^4 f (c+d)^2 \sqrt{c^2-d^2}}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d^2 f (c+d)^2 (c+d \sin (e+f x))}-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 f (c+d)^2}-\frac{a^3 x (-A d+3 B c-3 B d)}{d^4}+\frac{a (B c-A d) \cos (e+f x) (a \sin (e+f x)+a)^2}{2 d f (c+d) (c+d \sin (e+f x))^2} \]

[Out]

-((a^3*(3*B*c - A*d - 3*B*d)*x)/d^4) - (a^3*(c - d)*(A*d*(2*c^2 + 6*c*d + 7*d^2) - 3*B*(2*c^3 + 4*c^2*d + c*d^
2 - 2*d^3))*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(d^4*(c + d)^2*Sqrt[c^2 - d^2]*f) - (a^3*(3*B*c*
(2*c + 3*d) - A*d*(2*c + 5*d))*Cos[e + f*x])/(2*d^3*(c + d)^2*f) + (a*(B*c - A*d)*Cos[e + f*x]*(a + a*Sin[e +
f*x])^2)/(2*d*(c + d)*f*(c + d*Sin[e + f*x])^2) - ((A*d*(c + 4*d) - B*(3*c^2 + 4*c*d - 2*d^2))*Cos[e + f*x]*(a
^3 + a^3*Sin[e + f*x]))/(2*d^2*(c + d)^2*f*(c + d*Sin[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.93441, antiderivative size = 305, normalized size of antiderivative = 1., number of steps used = 8, number of rules used = 7, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {2975, 2968, 3023, 2735, 2660, 618, 204} \[ -\frac{a^3 (c-d) \left (A d \left (2 c^2+6 c d+7 d^2\right )-3 B \left (4 c^2 d+2 c^3+c d^2-2 d^3\right )\right ) \tan ^{-1}\left (\frac{c \tan \left (\frac{1}{2} (e+f x)\right )+d}{\sqrt{c^2-d^2}}\right )}{d^4 f (c+d)^2 \sqrt{c^2-d^2}}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3 \sin (e+f x)+a^3\right )}{2 d^2 f (c+d)^2 (c+d \sin (e+f x))}-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 f (c+d)^2}-\frac{a^3 x (-A d+3 B c-3 B d)}{d^4}+\frac{a (B c-A d) \cos (e+f x) (a \sin (e+f x)+a)^2}{2 d f (c+d) (c+d \sin (e+f x))^2} \]

Antiderivative was successfully verified.

[In]

Int[((a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x]))/(c + d*Sin[e + f*x])^3,x]

[Out]

-((a^3*(3*B*c - A*d - 3*B*d)*x)/d^4) - (a^3*(c - d)*(A*d*(2*c^2 + 6*c*d + 7*d^2) - 3*B*(2*c^3 + 4*c^2*d + c*d^
2 - 2*d^3))*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(d^4*(c + d)^2*Sqrt[c^2 - d^2]*f) - (a^3*(3*B*c*
(2*c + 3*d) - A*d*(2*c + 5*d))*Cos[e + f*x])/(2*d^3*(c + d)^2*f) + (a*(B*c - A*d)*Cos[e + f*x]*(a + a*Sin[e +
f*x])^2)/(2*d*(c + d)*f*(c + d*Sin[e + f*x])^2) - ((A*d*(c + 4*d) - B*(3*c^2 + 4*c*d - 2*d^2))*Cos[e + f*x]*(a
^3 + a^3*Sin[e + f*x]))/(2*d^2*(c + d)^2*f*(c + d*Sin[e + f*x]))

Rule 2975

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b^2*(B*c - A*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*(c + d*S
in[e + f*x])^(n + 1))/(d*f*(n + 1)*(b*c + a*d)), x] - Dist[b/(d*(n + 1)*(b*c + a*d)), Int[(a + b*Sin[e + f*x])
^(m - 1)*(c + d*Sin[e + f*x])^(n + 1)*Simp[a*A*d*(m - n - 2) - B*(a*c*(m - 1) + b*d*(n + 1)) - (A*b*d*(m + n +
 1) - B*(b*c*m - a*d*(n + 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d
, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] && LtQ[n, -1] && IntegerQ[2*m] && (IntegerQ[2*n]
 || EqQ[c, 0])

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rule 2735

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*x)/d
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rule 2660

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x]}, Dis
t[(2*e)/d, Subst[Int[1/(a + 2*b*e*x + a*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] &&
 NeQ[a^2 - b^2, 0]

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{(a+a \sin (e+f x))^3 (A+B \sin (e+f x))}{(c+d \sin (e+f x))^3} \, dx &=\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}+\frac{\int \frac{(a+a \sin (e+f x))^2 (-2 a (B (c-d)-2 A d)+a (3 B c-A d+2 B d) \sin (e+f x))}{(c+d \sin (e+f x))^2} \, dx}{2 d (c+d)}\\ &=\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{\int \frac{(a+a \sin (e+f x)) \left (a^2 \left (A d (c+7 d)-3 B \left (c^2+c d-2 d^2\right )\right )+a^2 (3 B c (2 c+3 d)-A d (2 c+5 d)) \sin (e+f x)\right )}{c+d \sin (e+f x)} \, dx}{2 d^2 (c+d)^2}\\ &=\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{\int \frac{a^3 \left (A d (c+7 d)-3 B \left (c^2+c d-2 d^2\right )\right )+\left (a^3 (3 B c (2 c+3 d)-A d (2 c+5 d))+a^3 \left (A d (c+7 d)-3 B \left (c^2+c d-2 d^2\right )\right )\right ) \sin (e+f x)+a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \sin ^2(e+f x)}{c+d \sin (e+f x)} \, dx}{2 d^2 (c+d)^2}\\ &=-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 (c+d)^2 f}+\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{\int \frac{a^3 d \left (A d (c+7 d)-3 B \left (c^2+c d-2 d^2\right )\right )-2 a^3 (c+d)^2 (3 B (c-d)-A d) \sin (e+f x)}{c+d \sin (e+f x)} \, dx}{2 d^3 (c+d)^2}\\ &=-\frac{a^3 (3 B c-A d-3 B d) x}{d^4}-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 (c+d)^2 f}+\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\left (a^3 (c-d) \left (A d \left (2 c^2+6 c d+7 d^2\right )-3 B \left (2 c^3+4 c^2 d+c d^2-2 d^3\right )\right )\right ) \int \frac{1}{c+d \sin (e+f x)} \, dx}{2 d^4 (c+d)^2}\\ &=-\frac{a^3 (3 B c-A d-3 B d) x}{d^4}-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 (c+d)^2 f}+\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}-\frac{\left (a^3 (c-d) \left (A d \left (2 c^2+6 c d+7 d^2\right )-3 B \left (2 c^3+4 c^2 d+c d^2-2 d^3\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{c+2 d x+c x^2} \, dx,x,\tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^4 (c+d)^2 f}\\ &=-\frac{a^3 (3 B c-A d-3 B d) x}{d^4}-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 (c+d)^2 f}+\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}+\frac{\left (2 a^3 (c-d) \left (A d \left (2 c^2+6 c d+7 d^2\right )-3 B \left (2 c^3+4 c^2 d+c d^2-2 d^3\right )\right )\right ) \operatorname{Subst}\left (\int \frac{1}{-4 \left (c^2-d^2\right )-x^2} \, dx,x,2 d+2 c \tan \left (\frac{1}{2} (e+f x)\right )\right )}{d^4 (c+d)^2 f}\\ &=-\frac{a^3 (3 B c-A d-3 B d) x}{d^4}-\frac{a^3 (c-d) \left (A d \left (2 c^2+6 c d+7 d^2\right )-3 B \left (2 c^3+4 c^2 d+c d^2-2 d^3\right )\right ) \tan ^{-1}\left (\frac{d+c \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{d^4 (c+d)^2 \sqrt{c^2-d^2} f}-\frac{a^3 (3 B c (2 c+3 d)-A d (2 c+5 d)) \cos (e+f x)}{2 d^3 (c+d)^2 f}+\frac{a (B c-A d) \cos (e+f x) (a+a \sin (e+f x))^2}{2 d (c+d) f (c+d \sin (e+f x))^2}-\frac{\left (A d (c+4 d)-B \left (3 c^2+4 c d-2 d^2\right )\right ) \cos (e+f x) \left (a^3+a^3 \sin (e+f x)\right )}{2 d^2 (c+d)^2 f (c+d \sin (e+f x))}\\ \end{align*}

Mathematica [B]  time = 3.18217, size = 830, normalized size = 2.72 \[ \frac{a^3 (\sin (e+f x)+1)^3 \left (\frac{4 (c-d) \left (3 B \left (2 c^3+4 d c^2+d^2 c-2 d^3\right )-A d \left (2 c^2+6 d c+7 d^2\right )\right ) \tan ^{-1}\left (\frac{d+c \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{\sqrt{c^2-d^2}}+\frac{-12 B e c^5-12 B f x c^5+4 A d e c^4-12 B d e c^4+4 A d f x c^4-12 B d f x c^4-24 B d e \sin (e+f x) c^4-24 B d f x \sin (e+f x) c^4+8 A d^2 e c^3+6 B d^2 e c^3+8 A d^2 f x c^3+6 B d^2 f x c^3+8 A d^2 e \sin (e+f x) c^3-24 B d^2 e \sin (e+f x) c^3+8 A d^2 f x \sin (e+f x) c^3-24 B d^2 f x \sin (e+f x) c^3-9 B d^2 \sin (2 (e+f x)) c^3+6 A d^3 e c^2+6 B d^3 e c^2+6 A d^3 f x c^2+6 B d^3 f x c^2+B d^3 \cos (3 (e+f x)) c^2+16 A d^3 e \sin (e+f x) c^2+24 B d^3 e \sin (e+f x) c^2+16 A d^3 f x \sin (e+f x) c^2+24 B d^3 f x \sin (e+f x) c^2+3 A d^3 \sin (2 (e+f x)) c^2-9 B d^3 \sin (2 (e+f x)) c^2+4 A d^4 e c+6 B d^4 e c+4 A d^4 f x c+6 B d^4 f x c+2 B d^4 \cos (3 (e+f x)) c+8 A d^4 e \sin (e+f x) c+24 B d^4 e \sin (e+f x) c+8 A d^4 f x \sin (e+f x) c+24 B d^4 f x \sin (e+f x) c+3 A d^4 \sin (2 (e+f x)) c+4 B d^4 \sin (2 (e+f x)) c+2 A d^5 e+6 B d^5 e+2 A d^5 f x+6 B d^5 f x-d \left (2 A d \left (-2 c^3-4 d c^2+5 d^2 c+d^3\right )+B \left (12 c^4+12 d c^3-9 d^2 c^2+4 d^3 c+d^4\right )\right ) \cos (e+f x)-2 d^2 (c+d)^2 (-3 B c+A d+3 B d) (e+f x) \cos (2 (e+f x))+B d^5 \cos (3 (e+f x))-6 A d^5 \sin (2 (e+f x))-2 B d^5 \sin (2 (e+f x))}{(c+d \sin (e+f x))^2}\right )}{4 d^4 (c+d)^2 f \left (\cos \left (\frac{1}{2} (e+f x)\right )+\sin \left (\frac{1}{2} (e+f x)\right )\right )^6} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + a*Sin[e + f*x])^3*(A + B*Sin[e + f*x]))/(c + d*Sin[e + f*x])^3,x]

[Out]

(a^3*(1 + Sin[e + f*x])^3*((4*(c - d)*(-(A*d*(2*c^2 + 6*c*d + 7*d^2)) + 3*B*(2*c^3 + 4*c^2*d + c*d^2 - 2*d^3))
*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/Sqrt[c^2 - d^2] + (-12*B*c^5*e + 4*A*c^4*d*e - 12*B*c^4*d*e
 + 8*A*c^3*d^2*e + 6*B*c^3*d^2*e + 6*A*c^2*d^3*e + 6*B*c^2*d^3*e + 4*A*c*d^4*e + 6*B*c*d^4*e + 2*A*d^5*e + 6*B
*d^5*e - 12*B*c^5*f*x + 4*A*c^4*d*f*x - 12*B*c^4*d*f*x + 8*A*c^3*d^2*f*x + 6*B*c^3*d^2*f*x + 6*A*c^2*d^3*f*x +
 6*B*c^2*d^3*f*x + 4*A*c*d^4*f*x + 6*B*c*d^4*f*x + 2*A*d^5*f*x + 6*B*d^5*f*x - d*(2*A*d*(-2*c^3 - 4*c^2*d + 5*
c*d^2 + d^3) + B*(12*c^4 + 12*c^3*d - 9*c^2*d^2 + 4*c*d^3 + d^4))*Cos[e + f*x] - 2*d^2*(c + d)^2*(-3*B*c + A*d
 + 3*B*d)*(e + f*x)*Cos[2*(e + f*x)] + B*c^2*d^3*Cos[3*(e + f*x)] + 2*B*c*d^4*Cos[3*(e + f*x)] + B*d^5*Cos[3*(
e + f*x)] - 24*B*c^4*d*e*Sin[e + f*x] + 8*A*c^3*d^2*e*Sin[e + f*x] - 24*B*c^3*d^2*e*Sin[e + f*x] + 16*A*c^2*d^
3*e*Sin[e + f*x] + 24*B*c^2*d^3*e*Sin[e + f*x] + 8*A*c*d^4*e*Sin[e + f*x] + 24*B*c*d^4*e*Sin[e + f*x] - 24*B*c
^4*d*f*x*Sin[e + f*x] + 8*A*c^3*d^2*f*x*Sin[e + f*x] - 24*B*c^3*d^2*f*x*Sin[e + f*x] + 16*A*c^2*d^3*f*x*Sin[e
+ f*x] + 24*B*c^2*d^3*f*x*Sin[e + f*x] + 8*A*c*d^4*f*x*Sin[e + f*x] + 24*B*c*d^4*f*x*Sin[e + f*x] - 9*B*c^3*d^
2*Sin[2*(e + f*x)] + 3*A*c^2*d^3*Sin[2*(e + f*x)] - 9*B*c^2*d^3*Sin[2*(e + f*x)] + 3*A*c*d^4*Sin[2*(e + f*x)]
+ 4*B*c*d^4*Sin[2*(e + f*x)] - 6*A*d^5*Sin[2*(e + f*x)] - 2*B*d^5*Sin[2*(e + f*x)])/(c + d*Sin[e + f*x])^2))/(
4*d^4*(c + d)^2*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^6)

________________________________________________________________________________________

Maple [B]  time = 0.217, size = 2906, normalized size = 9.5 \begin{align*} \text{output too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x)

[Out]

-4/f*a^3*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^3*A-16/f*a^3
*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)*A-4/f*a^3*d/(c*tan(1
/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)*B-1/f*a^3/(c*tan(1/2*f*x+1/2*e)
^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c*tan(1/2*f*x+1/2*e)^2*A+2/f*a^3/d^2/(c*tan(1/2*f*x+1/2*e)^2+2*
tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*A*c^3+4/f*a^3/d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+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an(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*B*c+
7/f*a^3/(c^2+2*c*d+d^2)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*A+6/f*a^3/(c^
2+2*c*d+d^2)/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^2-d^2)^(1/2))*B+5/f*a^3/(c*tan(1/2*f*x
+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c*tan(1/2*f*x+1/2*e)^3*A+6/f*a^3/(c*tan(1/2*f*x+1/2*e)^2
+2*tan(1/2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c*tan(1/2*f*x+1/2*e)^3*B-5/f*a^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/
2*f*x+1/2*e)*d+c)^2/(c^2+2*c*d+d^2)*c*tan(1/2*f*x+1/2*e)^2*B+11/f*a^3/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/
2*e)*d+c)^2*c/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)*A+7/f*a^3*d/(c*tan(1/2*f*x+1/2*e)^2+2*tan(1/2*f*x+1/2*e)*d+c)
^2/(c^2+2*c*d+d^2)*tan(1/2*f*x+1/2*e)^2*A-2/f*a^3/d^3*B/(1+tan(1/2*f*x+1/2*e)^2)+2/f*a^3/d^3*A*arctan(tan(1/2*
f*x+1/2*e))+6/f*a^3/d^3*B*arctan(tan(1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 3.72469, size = 3568, normalized size = 11.7 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

[-1/4*(4*(3*B*a^3*c^3*d^2 - (A - 3*B)*a^3*c^2*d^3 - (2*A + 3*B)*a^3*c*d^4 - (A + 3*B)*a^3*d^5)*f*x*cos(f*x + e
)^2 + 4*(B*a^3*c^2*d^3 + 2*B*a^3*c*d^4 + B*a^3*d^5)*cos(f*x + e)^3 - 4*(3*B*a^3*c^5 - (A - 3*B)*a^3*c^4*d - 2*
A*a^3*c^3*d^2 - 2*A*a^3*c^2*d^3 - (2*A + 3*B)*a^3*c*d^4 - (A + 3*B)*a^3*d^5)*f*x - (6*B*a^3*c^5 - 2*(A - 6*B)*
a^3*c^4*d - 3*(2*A - 3*B)*a^3*c^3*d^2 - 3*(3*A - 2*B)*a^3*c^2*d^3 - 3*(2*A - B)*a^3*c*d^4 - (7*A + 6*B)*a^3*d^
5 - (6*B*a^3*c^3*d^2 - 2*(A - 6*B)*a^3*c^2*d^3 - 3*(2*A - B)*a^3*c*d^4 - (7*A + 6*B)*a^3*d^5)*cos(f*x + e)^2 +
 2*(6*B*a^3*c^4*d - 2*(A - 6*B)*a^3*c^3*d^2 - 3*(2*A - B)*a^3*c^2*d^3 - (7*A + 6*B)*a^3*c*d^4)*sin(f*x + e))*s
qrt(-(c - d)/(c + d))*log(((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2 + 2*((c^2 + c*d)*cos(
f*x + e)*sin(f*x + e) + (c*d + d^2)*cos(f*x + e))*sqrt(-(c - d)/(c + d)))/(d^2*cos(f*x + e)^2 - 2*c*d*sin(f*x
+ e) - c^2 - d^2)) - 2*(6*B*a^3*c^4*d - 2*(A - 3*B)*a^3*c^3*d^2 - (4*A + 3*B)*a^3*c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an(-(c*sin(f
*x + e) + d)*sqrt((c - d)/(c + d))/((c - d)*cos(f*x + e))) - (6*B*a^3*c^4*d - 2*(A - 3*B)*a^3*c^3*d^2 - (4*A +
 3*B)*a^3*c^2*d^3 + 5*(A + B)*a^3*c*d^4 + (A + 2*B)*a^3*d^5)*cos(f*x + e) - (4*(3*B*a^3*c^4*d - (A - 3*B)*a^3*
c^3*d^2 - (2*A + 3*B)*a^3*c^2*d^3 - (A + 3*B)*a^3*c*d^4)*f*x + (9*B*a^3*c^3*d^2 - 3*(A - 3*B)*a^3*c^2*d^3 - (3
*A + 4*B)*a^3*c*d^4 + 2*(3*A + B)*a^3*d^5)*cos(f*x + e))*sin(f*x + e))/((c^2*d^6 + 2*c*d^7 + d^8)*f*cos(f*x +
e)^2 - 2*(c^3*d^5 + 2*c^2*d^6 + c*d^7)*f*sin(f*x + e) - (c^4*d^4 + 2*c^3*d^5 + 2*c^2*d^6 + 2*c*d^7 + d^8)*f)]

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.34504, size = 1331, normalized size = 4.36 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(A+B*sin(f*x+e))/(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

((6*B*a^3*c^4 - 2*A*a^3*c^3*d + 6*B*a^3*c^3*d - 4*A*a^3*c^2*d^2 - 9*B*a^3*c^2*d^2 - A*a^3*c*d^3 - 9*B*a^3*c*d^
3 + 7*A*a^3*d^4 + 6*B*a^3*d^4)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(c) + arctan((c*tan(1/2*f*x + 1/2*e) + d)/
sqrt(c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